package com.gk.controller;

import com.gk.http.entity.HttpResult;
import com.gk.service.BaseInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("BtypeInfo")
@Api(tags = "往来单位信息")
@Slf4j
public class BtypeController {
    @Autowired
    private BaseInfoService baseInfoService;
    @GetMapping("/uploadBtype")
    @ApiOperation(value = "添加往来单位基本信息到国控", response = HttpResult.class)
    public Object uploadBtype(String userCode) {
        log.info("添加往来单位基本信息到国控访问成功:" + userCode);
        return baseInfoService.uploadBtypeInfo(userCode);

    }

    @GetMapping("/uploadBtypeAddress")
    @ApiOperation(value = "添加往来单位地址档案基本信息到国控", response = HttpResult.class)
    public Object uploadBtypeAddress(String userCode) {
        log.info("添加往来单位地址档案基本信息到国控访问成功:" + userCode);
        return baseInfoService.uploadBtypeAddressInfo(userCode);

    }
}
